#include <bits/stdc++.h>
#define int long long
#define ls tree[x].lson
#define rs tree[x].rson
using namespace std;
int read()
{
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9')
    {
        if(ch=='-')
            f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9')
    {
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
int n,x,a[1000001],cnt,l=1,ans;
signed main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++)
    {
        a[i]=read();
    }
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++)
    {
        if(a[i]>a[l])
        {
            ans++;
            l++;
        }
    }
    printf("%lld",n-ans);
    return 0;
}
